package cz.proks.schoolpupilbook.gwt.widget.student;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

import cz.proks.schoolpupilbook.gwt.widget.common.LoggedUserPanel;
import cz.proks.schoolpupilbook.gwt.widget.common.StudentView;
import cz.proks.schoolpupilbook.shared.domain.User;

public class StudentWidget extends Composite {

	interface StudentUiBinder extends UiBinder<Widget, StudentWidget> {
	}

	private static StudentUiBinder uiBinder = GWT.create(StudentUiBinder.class);

	@UiField LoggedUserPanel loggedUserPanel;
	@UiField (provided = true) StudentView studentView;
	
	public StudentWidget(User user) {
		studentView = new StudentView(user);
		initWidget(uiBinder.createAndBindUi(this));	
	}	
		
	public LoggedUserPanel getLoggedUserPanel() {
		return loggedUserPanel;
	}
	
	public StudentView getCourses() {
		return studentView;
	}	
}
